#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "camera.h"
#include "facethread.h"
#include <QMainWindow>
#include <QTimer>
#include <QThread>
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    bool led_bedroom;
    bool led_saloon;
    bool led_kitchen;
    bool led_restroom;
    unsigned int run_num;
    QTimer step_timer;

private slots:
    void on_pushButton_bed_clicked();

    void on_pushButton_saloon_clicked();

    void on_pushButton_kitchen_clicked();

    void on_pushButton_rest_clicked();

    void showImage(QImage image);

    void sndwarm();

    void timerRunning();

    void on_pushButton_beep_clicked();

    void on_pushButton_prev_clicked();

    void on_pushButton_play_pause_clicked();

    void on_pushButton_next_clicked();

    void on_pushButton_startstep_clicked();


    void on_pushButton_kernel_clicked();

    void on_pushButton_server_clicked();

    void on_pushButton_client_clicked();

private:
    Ui::MainWindow *ui;
    cameraclient camera_client;
    //faceThread   face_thread;
    void sendToServer(int cmd);
    void recvFromServer(void *buf,int count);
    int sd;
    QThread* thread;//线程对象     改
    faceThread* FaceWork;//工作线程对象
};

#endif // MAINWINDOW_H
